﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WorldBankBBS.Menus
{
    public class MenuItem
    {
        public string Abbreviation { get; set; }
        public string Full { get; set; }
        public bool TakesParameters { get; set; }
        public bool TakesThreadParameter { get; set; }
        public bool TakesSubboardParameter { get; set; }
        public string ResourcePattern { get; set; }
        public bool UseCurrentContext { get; set; }

        public string GetResourcePath(params object[] data)
        {
            try
            {
                if (TakesParameters || UseCurrentContext || TakesSubboardParameter || TakesThreadParameter)
                    return string.Format(ResourcePattern, data);
            }
            catch
            {
            }

            return ResourcePattern;
        }
    }
}
